/*
* @Author: Marte
* @Date:   2017-07-20 11:28:15
* @Last Modified by:   Marte
* @Last Modified time: 2017-07-21 17:06:48
*/

var mySwiper = new Swiper ('.swiper-container', {
    direction: 'horizontal',
   autoplay: 1000,
   loop: true,
    autoplayDisableOnInteraction:false,
      paginationClickable: true,
    // 如果需要分页器
    pagination: '.swiper-pagination',

  })


    //滚动条超出多少高度后改变搜素框背景颜色
        $(window).scroll(function() {
        //获得当前视口的高度
        var banner_height=$('.swiper-container').height();
        //获得滚动条的偏移距离
        var b=$(this).scrollTop();
         if (b > banner_height) {
        $('.header_top').css({
            'background':'#f5f5f5',
            'height':'1.04669887rem'
        });
        $('.header_top').children().css('margin-top','5px');
        }else{
             $('.header_top').css('background','');
             $('.header_top').css('height','0.80515298rem');
        }
    })



    $('.menu ul li').click(function(){
        $(this).addClass('menu_bule');
        $(this).siblings().removeClass('menu_bule')
    })